<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>User Photo</title>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
    <div id="app">
        <h1>Welcome, {{ username }}!</h1>
        <div v-if="photoUrl">
            <img :src="photoUrl" alt="User Photo" style="max-width: 300px;">
        </div>
        <p v-else>No photo found.</p>
    </div>

    <script>
        const { createApp } = Vue;

        createApp({
            data() {
                return {
                    username: '',
                    photoUrl: ''
                };
            },
            mounted() {
                // 从 URL 中获取用户名和照片 URL
                const urlParams = new URLSearchParams(window.location.search);
                this.username = urlParams.get('username');
                this.photoUrl = urlParams.get('photoUrl');
            }
        }).mount('#app');
    </script>
</body>
</html>